<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script> 
        const obj={
            aaa:function(){
                setTimeout(function(){
                    setTimeout(function(){
                        console.log(this)    
                    },100)  

                    setTimeout(()=>{
                        console.log(this)  
                    },100)  
                },100) 
                setTimeout(()=>{
                    setTimeout(function(){
                        console.log(this)    
                    },100)  

                    setTimeout(()=>{
                        console.log(this)  
                    },100)  
                },100)
            }
        }
        obj.aaa()
    </script>

</body>
</html>
<!-- 箭头函数中的this引用的是最近作用域中的this  -->
<!-- 如何查找 -->
<!-- 向外层一层一层查找 直到找到一个this定义 -->